<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册 - 图书管理系统</title>
    <link rel="stylesheet" href="/css/style.css">
</head>
<body>
<div class="container">
    <div class="form-container">
        <h2 class="page-title">用户注册</h2>

        <div id="error-message" class="error-message" th:if="${error}" th:text="${error}"></div>

        <form id="registerForm" action="/register" method="post">
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" name="username" class="form-control" required>
            </div>

            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" class="form-control" required>
            </div>

            <div class="form-group">
                <label for="email">电子邮件</label>
                <input type="email" id="email" name="email" class="form-control">
            </div>

            <div class="form-group">
                <button type="submit" class="btn">注册</button>
            </div>

            <div>
                已有账号？<a href="/login">登录</a>
            </div>
        </form>
    </div>
</div>

<script src="/bookmanagement/js/script.js"></script>
</body>
</html>